import QtQuick
import "qrc:/usv_bridge/UI/compass/"

Rectangle{
    id: control
    color:"#F7F7F7"
    anchors{
        horizontalCenter: parent.horizontalCenter
    }
    radius: 5

    //第一行
    Text{
        id: control_title
        text: qsTr("控制信息")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#0070D6"
        anchors{
            top: parent.top
            topMargin: 10
            horizontalCenter: parent.horizontalCenter
        }
    }

    //第二行 权限
    Image{
        id: control_icon
        source:"qrc:/usv_bridge/UI/compass/10-autopilot.png"
        anchors{
            left: parent.left
            leftMargin: 40
            top: control_title.bottom
            topMargin: 10
        }
    }

    Text{
        id: control_text
        text: qsTr("Autopilot")
        font.family: ("Noto Sans")
        font.pixelSize: 36
        color: "#0070D6"
        anchors{
            verticalCenter: control_icon.verticalCenter
            left: control_icon.right
            leftMargin: 5
        }
    }

    //横线分割线
    Rectangle{
        id: cross_split_line
        width: 280
        height: 2
        radius: 1
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            top: control_text.bottom
            topMargin: 20
            horizontalCenter: parent.horizontalCenter
        }
    }

    //航向、航速设定
    Rectangle{
        id: set_autopilot
        anchors{
            left: cross_split_line.left
            leftMargin: 25
            top:cross_split_line.bottom
            topMargin: -5
        }

        Row{
            spacing: 50

            Rectangle{
                id: set_head
                width: 98
                height: 80
                color:"#00000000"
                Image{
                    id: set_icon_head
                    width: 24
                    height: 24
                    anchors{
                        left: set_head.left
                        verticalCenter: set_head.verticalCenter
                    }

                    source:"qrc:/usv_bridge/UI/compass/container_icon.png"
                }

                Text{
                    id: set_text_head
                    text: qsTr("45")
                    font.family: ("Noto Sans")
                    font.pixelSize: 36
                    color: "#0070D6"
                    anchors{
                        left: set_icon_head.right
                        leftMargin: 10
                        verticalCenter: set_head.verticalCenter
                    }
                }

                Text{
                    id: set_text_head_unit
                    text: qsTr("Set HDG")
                    font.family: ("Noto Sans")
                    font.pixelSize: 16
                    color: "#666666"
                    anchors{
                        top: set_text_head.bottom
                        topMargin: 5
                        right: set_text_head.right
                    }
                }
            }

            Rectangle{
                id: set_speed
                width: 98
                height: 80
                color:"#00000000"

                Image{
                    id: set_icon_speed
                    width: 24
                    height: 24
                    anchors{
                        left: set_speed.left
                        verticalCenter: set_speed.verticalCenter
                    }
                    source:"qrc:/usv_bridge/UI/compass/container_icon.png"
                }
                Text{
                    id: set_text_speed
                    text: qsTr("12")
                    font.family: ("Noto Sans")
                    font.pixelSize: 36
                    color: "#0070D6"
                    anchors{
                        left: set_icon_speed.right
                        leftMargin: 10
                        verticalCenter: set_speed.verticalCenter
                    }
                }

                Text{
                    id: set_text_speed_unit
                    text: qsTr("Set STW")
                    font.family: ("Noto Sans")
                    font.pixelSize: 16
                    color: "#666666"
                    anchors{
                        top: set_text_speed.bottom
                        topMargin: 5
                        right: set_text_speed.right
                    }
                }
            }
        }

    }

}
